<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改计划日志')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-log-edit" th:object="${planToLog}">
            <input name="pId" th:field="*{pId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">资料类型：</label>
                <div class="col-sm-8">
                    <select id="pType" name="pType" th:with="type=${@dict.getType('sys_planlog_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">资料名称：</label>
                <div class="col-sm-8">
                    <input name="pName" th:field="*{pName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">上传资料：</label>
                <div class="col-sm-8">
                    <input name="pData"  class="form-control" type="file" required>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">上传时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="pTime" th:value="${#dates.format(planToLog.pTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">上传人：</label>
                <div class="col-sm-8">
                    <input name="pTheHeir" th:field="*{pTheHeir}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="pRemark" th:field="*{pRemark}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">项目信息：</label>
                <div class="col-sm-8">
                    <input name="pPro" th:field="*{pPro}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" hidden>审批状态：</label>
                <div class="col-sm-8">
                    <input id="pStatus" name="pStatus" class="form-control" type="hidden">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label" hidden>审批意见：</label>
                <div class="col-sm-8">
                    <input id="pOpinion" name="pOpinion" class="form-control" type="hidden">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "ruoyi/log";
        $("#form-log-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-log-edit').serialize());
            }
        }

        $("input[name='pTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>